<?php

namespace App\Modules\Business;

use App\Modules\AdapterApi;
use app\serverbusiness\logic\Business;
use App\Services\Business\BusinessIndex;

/**
 * 业务应用层
 * Class Business
 * @package App\Modules\Business
 */
class ApiBusiness extends AdapterApi
{
    /**
     * 业务添加
     */
    public function addBusiness()
    {
        $data = pick_array($this->postData,["company_name", "phone_name", "address", "phone", "code", "company_image"]);
        return BusinessIndex::Business()->add($data);
    }

    /**
     * 获取业务列表
     * @return mixed
     */
    public function businessList()
    {
        $data = $this->postData;
        return BusinessIndex::Business()->businessList($data);
    }

}